<?php
require_once(TEMPLATEPATH.'/functions.php');

function nurbaya_widgets_init() {
	register_sidebar( array(
		'name' => __( 'Header - Right', 'nurbaya' ),
		'id' => 'header-right',
		'description' => __( 'Header - Right', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
	register_sidebar( array(
		'name' => __( 'Homepage - Left Cucumber', 'nurbaya' ),
		'id' => 'homepage-left-cucumber',
		'description' => __( 'Homepage - Left Cucumber', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
	register_sidebar( array(
		'name' => __( 'Homepage - Right Cucumber', 'nurbaya' ),
		'id' => 'homepage-right-cucumber',
		'description' => __( 'Homepage - Right Cucumber', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
	register_sidebar( array(
		'name' => __( 'Homepage - Left Content 1', 'nurbaya' ),
		'id' => 'homepage-left-content-1',
		'description' => __( 'Homepage - Left Content 1', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
	register_sidebar( array(
		'name' => __( 'Homepage - Right Content 1', 'nurbaya' ),
		'id' => 'homepage-right-content-1',
		'description' => __( 'Homepage - Right Content 1', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
	register_sidebar( array(
		'name' => __( 'Homepage - Left Content 2', 'nurbaya' ),
		'id' => 'homepage-left-content-2',
		'description' => __( 'Homepage - Left Content 2', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
	register_sidebar( array(
		'name' => __( 'Homepage - Right Content 2', 'nurbaya' ),
		'id' => 'homepage-right-content-2',
		'description' => __( 'Homepage - Right Content 2', 'nurbaya' ),
		'before_widget' => '<div class="boxes %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h2 class="cufon">',
		'after_title' => '</h2>',
	) );
}
add_action( 'init', 'nurbaya_widgets_init' );

add_action( 'init', 'wpa5413_init' );
function wpa5413_init()
{
    // Remember to flush the rules once manually after you added this code!
    add_rewrite_rule(
        // The regex to match the incoming URL
        'members/([^/]+)/?',
        // The resulting internal URL: `index.php` because we still use WordPress
        // `pagename` because we use this WordPress page
        // `designer_slug` because we assign the first captured regex part to this variable
        'index.php?pagename=member&username=$matches[1]',
        // This is a rather specific URL, so we add it to the top of the list
        // Otherwise, the "catch-all" rules at the bottom (for pages and attachments) will "win"
        'top' );
}

function nurbaya_eventlocation(){
return '123';
}

add_shortcode('geteventlocation','nurbaya_eventlocation');

add_filter('widget_text', 'do_shortcode');
?>